/*
 * Copyright (C) 2010-2011 Enrique Lara (enrique.posix2.lara@gmail.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
 * limitations under the License.
  */
package app.timetogo.provider;

import android.net.Uri;

import android.provider.BaseColumns;

public final class Tables {
    public static final String AUTHORITY = "app.timetogo.provider.TimeToGoProvider";

    public static final class Alarms implements BaseColumns {
        private Alarms() {
        }

        public static final String TABLE_NAME = "alarms";
        public static final Uri CONTENT_URI = Uri.parse("content://" + Tables.AUTHORITY + "/" + Alarms.TABLE_NAME);

        /**
         * The MIME type of {@link #CONTENT_URI} providing a directory of notes.
         */
        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.loslaras.alarm";

        /**
         * The MIME type of a {@link #CONTENT_URI} sub-directory of a single note.
         */
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.loslaras.alarm";
        public static final String DEFAULT_SORT_ORDER = "hour, minute";

        /* Timing */
        public static final String ENABLED = "enabled";
        public static final String HOUR = "hour";
        public static final String MINUTE = "minute";
        public static final String DAYS_IN_WEEK = "days_in_week";

        /* Criteria */
        public static final String AGENCY_ID = "agency_id";
        public static final String STOP = "stop";
        public static final String ROUTE = "line";
        public static final String DIRECTION = "destination";
        public static final String TIME_MAX = "time_max";
        public static final String TIME_MIN = "time_min";

        /*
         *
        //XXX instead of holding onto everything, get the specific station we are interested in.
        * //App Assembly:Do a lookup Method 10: Bus Stops, to get all stops
        //XXX consdier parsing xml and converting into delimited text file. stopId|lat|lon

        //1)User Enters Stop (Station) #, get lat/lon from file
        //Api: Then do a lookup Method 10: Bus Stops, with lat/lon and parse response to get stop Routes
        //2) User select a route(line)
        //Api: Get Route detail - Method 12: Bus Route Details - cache for 24 hours OR user configured period
        - 3)Get headsigns (destination) from results


        Poller
        - Get Stop lat/lon + routeId, use for Method 13: Bus Positions
        Pull out BusPosition entries with same direction/headsign.
        //XXX how to know if before or after my stop?
        // Bounce against route shape from Meth12. or maybe against schedule + start times.
         * filter to before current stop
         * then bounce against schedule: http://developer.wmata.com/docs/read/Method_11, cache for day
        * add deviation
        *
        *
        //Then do a http://developer.wmata.com/docs/read/Method_12 to get Directions 1 and 2
        //Consider caching route directions.

        For bus, consider:
        STOP=1000533
        //LAT=38.8790408
        //LON=-76.98852827

         */

        /* Representation */
        public static final String LABEL = "label";
        public static final String RINGTONE = "ringtone";
        public static final String VIBRATE = "vibrate";
        public static final String IMAGE = "image";
    }
}
